home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
130 MIDI Tool Box
/
130 MIDI Tool Box.iso
/
pc800
/
pc802.c
< prev
next >
Wrap
Text File
|
1987-08-31
|
2KB
|
71 lines
#include<stdarg.h>
#include<stdio.h>
#include<stdlib.h>
#include<dos.h>
/* cursor module */
int curs_data[60]={
11,12,13,14,15,
16,17,18,19,20,
21,22,0,0,0,
26,27,0,0,0,
28,29,30,31,32,
33,34,35,36,37,
38,39,40,0,0,
41,42,58,0,0,
43,0,0,0,0,
44,45,46,0,0,
47,48,49,50,51,
52,53,54,55,56
};
extern int current_parm,cur_curs;
extern int parm_x[],parm_y[];
/*------------------------------------------------------------------*/
parm_right()
{
++cur_curs;
chk_curs();
while (curs_data[cur_curs]==0) ++cur_curs; chk_curs();
mov_curs();
}
/*------------------------------------------------------------------*/
parm_left()
{
--cur_curs;
chk_curs();
while (curs_data[cur_curs]==0) --cur_curs; chk_curs();
mov_curs();
}
/*------------------------------------------------------------------*/
parm_up()
{
cur_curs-=5;
chk_curs();
while (curs_data[cur_curs]==0) --cur_curs; chk_curs();
mov_curs();
}
/*------------------------------------------------------------------*/
parm_down()
{
cur_curs+=5;
chk_curs();
while (curs_data[cur_curs]==0) --cur_curs; chk_curs();
mov_curs();
}
/*------------------------------------------------------------------*/
chk_curs()
{
if (cur_curs>59) cur_curs-=60;
if (cur_curs<0) cur_curs+=60;
}
/*------------------------------------------------------------------*/
mov_curs()
{
current_parm=curs_data[cur_curs];
gotoxy(parm_x[current_parm],parm_y[current_parm]);
}
/*------------------------------------------------------------------*/